package com.sz.biz.common;

import java.util.ArrayList;
import java.util.List;

/**
 * Package: com.sz.biz.common <br>
 * Function: TODO: ADD FUNCTION <br>
 * Author: Charles. <br>
 * Date: 2017-03-27 11:31:00.
 */
public class TimelineRelation {
    /**
     * 孤立的，时间线不存在
     */
    public static final int ISOLATED = 0;
    /**
     * 相离，新段在左
     */
    public static final int DISJOINT_LEFT = 1;
    /**
     * 相离，新段在右
     */
    public static final int DISJOINT_RIGHT = 2;
    /**
     * 相离，新段在中间
     */
    public static final int DISJOINT_MID = 3;
    /**
     * 相交，在一段内部
     */
    public static final int INTERSECT_INSIDE_SEGMENT = 4;
    /**
     * 相交，与一段重合
     */
    public static final int INTERSECT_COINCIDE_SEGMENT = 5;
    /**
     * 相交
     */
    public static final int INTERSECT = 6;

    private int relation = 0;
    private boolean needExtend = false;
    private TimelineEntity intersectedLeft;
    private TimelineEntity intersectedRight;
    private List<TimelineEntity> coveredEntities = new ArrayList<>();

    public int getRelation() {
        return relation;
    }

    public void setRelation(int relation) {
        this.relation = relation;
    }

    public boolean isNeedExtend() {
        return needExtend;
    }

    public void setNeedExtend(boolean needExtend) {
        this.needExtend = needExtend;
    }

    public TimelineEntity getIntersectedLeft() {
        return intersectedLeft;
    }

    public void setIntersectedLeft(TimelineEntity intersectedLeft) {
        this.intersectedLeft = intersectedLeft;
    }

    public TimelineEntity getIntersectedRight() {
        return intersectedRight;
    }

    public void setIntersectedRight(TimelineEntity intersectedRight) {
        this.intersectedRight = intersectedRight;
    }

    public List<TimelineEntity> getCoveredEntities() {
        return coveredEntities;
    }

    public TimelineRelation() {

    }

    public TimelineRelation(int relation) {
        this.relation = relation;
    }
}
